package com.echo.code.thread.mode.active;

import com.echo.code.thread.future.Future;

/**
 * TestCase Created by baiyap on 2018/10/6.
 */
public class TestCase {

  public static void main(String[] args) {
    Service service = ActiveServiceFactory.active(new ServiceImpl());
    service.insert(1, "echo");
    Future<String> future = service.getName(1);
    try {
      String name = future.get();
      System.out.println(name);
    } catch (InterruptedException e) {
    }
  }
}
